<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="base :: header (title='外协发料')" />
<link th:href="@{plugins/common/css/basemessage.css}" rel="stylesheet" />
<link th:href="@{plugins/bootstrapEditable/css/bootstrap-editable-1.5.1.css}" rel="stylesheet" />
<link th:href="@{css/WareHouse/picking.css}" rel="stylesheet" />
<body class="">
	<div class="main-content blank_bg" id = "main_content">
		<div>
			<div>
				<div class="row">
					<div>
						<!-- 查询条件 start -->
						<div class="div_bg" style="padding: 5px 10px;">
							<div>
								<div style="float: left;">
									<span class="spanCss">任务单号：</span> 
									<input type="text" id="fIcomBillNo" name="fIcomBillNo" class="form-control clean_C" style="width: 140px;margin-right: 10px;" autocomplete="off" /> 
									<span class="spanCss">转出单号：</span> 
									<input type="text" id="fBillNo" name="fBillNo" class="form-control clean_C" style="width: 140px;margin-right: 10px;" autocomplete="off" /> 
									<span class="spanCss">产品代码：</span> 
									<input type="text" id="fNumber" name="fNumber" class="form-control clean_C" style="width: 140px;margin-right: 10px;" autocomplete="off" /> 
									<span class="spanCss">产品名称：</span> 
									<input type="text" id="fName" name="fName" class="form-control clean_C" style="width: 140px;margin-right: 10px;" autocomplete="off" /> 
									
								</div>
								<div style="float: left;">
									<button id="query" class="btn btn-default " type="button" style="margin-left: 10px;">查询</button>
									<button type="button" class="btn btn-default" id="more">更多</button>
									<button type="button" class="btn btn-default " id="resetting">重置</button>
								</div>
								<div style="clear:both"></div>
								<div class="" id="extend" style="margin-top: 5px;display: none;">
									<div style="clear:both;">
										<span class="spanCss">规格型号：</span> 
										<input type="text" id="fModel" name="fModel" class="form-control clean_C" style="width: 140px;margin-right: 10px;" autocomplete="off" /> 
										<span class="spanCss">委外单位：</span> 
										<input type="text" id="fSupplierName" name="fSupplierName" class="form-control clean_C" style="width: 180px;margin-right: 10px;" autocomplete="off" /> 
										<span class="spanCss">转出时间：</span> 
										<input type="text" id="startTime" name="startTime" class="form-control clean_C" style="width: 85px;" autocomplete="off"/>
										<span>—</span>
										<input type="text" id="endTime" name="endTime" class="form-control clean_C" style="width: 85px; margin-right: 10px;" autocomplete="off"/>
									</div>
								</div>
							</div>
						</div>
						<!-- 查询条件 end -->
						
						<!-- 外协首道工序发料列表 start -->
						<div class="div_bg" style="margin-top: 5px;">
							<span style="margin-bottom: 10px;" class="titleX">首道工序发料</span>
							<div>
								<table id="firstPickTable" class="table dataTable table-hover">
								</table>
							</div>
						</div>
						<!-- 外协首道工序发料列表 end -->
						
						<!-- 外协中间工序发料列表 start -->
						<div class="div_bg" style="margin-top: 5px;">
							<span style="margin-bottom: 10px;" class="titleX">中间工序发料</span>
							<div>
								<table id="otherPickTable" class="table dataTable table-hover">
								</table>
							</div>
						</div>
						<!-- 外协中间工序发料列表 end -->
					</div>
					<!-- 发料模态框 start -->
					<div class="modal fade " id="pickingModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 95%; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="FLtitle"></h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;width: 100%;">
									<form id="pickingForm" class="form-group">
										<div style="display: inline-block;overflow: hidden;margin-right: 15px;width: 100%;" id="">
											<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table table-content" id="pickingTitle" style="width: 100%;">
												<tr>
													<td class="title"><span class="sub">任务单号：</span></td>
													<td>
														<input type="text" id="pickingfIcomBillNo" name="fIcomBillNo" class="clean_c form-control" readonly="readonly">
														<input type="hidden" id="pickingfSubcOutId" name="fInterID" class="clean_c form-control" readonly="readonly">
														<input type="hidden" id="pickingfSubcOutEntryId" name="fEntryID" class="clean_c form-control" readonly="readonly">
													</td>
													<td class="title"><span class="sub">转出单号：</span></td>
													<td><input type="text" id="pickingfBillNo" name="fBillNo" class="clean_c form-control" readonly="readonly"></td>
													<td class="title"><span class="sub">产品代码：</span></td>
													<td><input type="text" id="pickingfNumber" name="fNumber" class="clean_c form-control" readonly="readonly" style="width: 97%;"></td>
												</tr>
												<tr>
													<td class="title"><span class="sub">产品名称：</span></td>
													<td><input type="text" id="pickingfName" name="fName" class="clean_c form-control" readonly="readonly"></td>
													<td class="title"><span class="sub">规格型号：</span></td>
													<td><input type="text" id="pickingfModel" name="fModel" class="clean_c form-control" readonly="readonly"></td>
													<td class="title"><span class="sub">应发套数：</span></td>
													<td><input type="text" id="pickingfTranOutQty" name="fTranOutQty" class="clean_c form-control" readonly="readonly" style="width: 97%;"></td>
												</tr>
											</table>
											<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table table-content" id="ck" style="margin-bottom: 10px;width: 100%;">
												<tr>
													<td class="title"><span class="sub"><span class="requiredCss">*</span>仓库：</span></td>
													<td>
														<select name="fStockID" id="fStockID" class="selectpicker clean_C " data-live-search="true" data-width="168px">
														</select>
														<input type="hidden" id="pickingID" name="fApplyID" class="clean_c form-control" readonly="readonly">
														<input type="hidden" id="fCardId" name="fCardId" class="clean_c form-control" readonly="readonly">
													</td>
												</tr>
											</table>
											<div style="margin-top: 5px;margin-left: 15px;width: 98%">
												<!-- 发料明细列表 -->
												<table id="pickDatailsTable" class="table dataTable table-hover pickDatails">
												</table>
											</div>
											<div style="width: 100%;">
												<div>
													<span style="padding-left: 17px;" class="requiredCss" id="tipTitle">注：铸件类需填写实发数，实发辅助数，换算率。</span>
													<!-- <span style="padding-left: 17px;" class="requiredCss">注：带*为必填字段。</span> -->
													<!-- <span style="padding-left: 17px;" class="requiredCss">注：带*为必填字段。输入实发齐套数按回车后，实发数才会有数据。</span> -->
												</div>
												<div style="text-align: center;position: relative;">
													<button type="button" class="btn btn-default" id="print" style="margin-right: 20px;">打印</button>
													<button type="button" class="btn btn-default" id="confirm" style="margin-right: 20px;">确定</button>
													<button type="button" class="btn btn-default" id="cancel" data-dismiss="modal">取消</button>
												</div>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<!-- 发料模态框 end -->
					
					<!-- 输入领料人卡号模态框 start -->
					<div class="modal fade " id="useModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 530px; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="titleModal">领料人</h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;">
									<div style="text-align: center;">
										<div>
											<span class="modalSpan">领料人卡号：</span>
											<input type="text" id="fWorker" name="fWorker" class="clean-c form-control bj_color resetting modalInput" autocomplete="off" />
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">领料人：</span>
											<input type="text" id="fWorkerName" name="fWorkerName" class="clean-c form-control resetting modalInput" readonly="readonly" />
										</div>
										<div style="margin-top: 10px;">
											<button id="save" class="btn btn-default" type="button" style="margin-right: 20px;">确定</button>
											<button id="back" class="btn btn-default" type="button">取消</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>	
					<!-- 输入领料人卡号模态框 end -->
					
					<!-- 替换模态框 start -->
					<div class="modal fade " id="replaceModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 95%; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="">物料替换</h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;width: 100%;">
									<form id="replaceForm" class="form-group">
										<div style="display: inline-block;overflow: hidden;margin-right: 15px;width: 100%;" id="">
											<div style="margin-left: 15px;">
												<div style="float: left;margin-bottom: 5px;">
													<span class="spanCss">物料代码：</span> 
													<input type="text" id="replacefNumber" name="fNumber" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
													<span class="spanCss">物料名称：</span> 
													<input type="text" id="replacefName" name="fName" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
													<span class="spanCss">规格型号：</span> 
													<input type="text" id="replacefModel" name="fModel" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
													<span class="spanCss">助记码：</span> 
													<input type="text" id="replacefHelpCode" name="fHelpCode" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
												</div>
												<div style="float: left;margin-bottom: 5px;">
													<button id="replaceQuery" class="btn btn-default " type="button" style="margin-left: 10px;">查询</button>
													<button type="button" class="btn btn-default " id="replaceResetting">重置</button>
												</div>
											</div>
											<div style="margin-top: 5px;margin-left: 15px;width: 98%">
												<!-- 物料明细列表 -->
												<table id="materielTable" class="table dataTable table-hover pickDatails">
												</table>
											</div>
											<div style="width: 100%;">
												<div>
													<span style="padding-left: 17px;" class="requiredCss" >注：双击物料即可，完成物料替换。</span>
												</div>
												<!-- <div style="text-align: center;position: relative;">
													<button type="button" class="btn btn-default" id="print" style="margin-right: 20px;">打印</button>
													<button type="button" class="btn btn-default" id="confirm" style="margin-right: 20px;">确定</button>
													<button type="button" class="btn btn-default" id="cancel" data-dismiss="modal">取消</button>
												</div> -->
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<!-- 替换模态框 end -->

					<!-- 替换模态框内，双击某行弹出的模态框 start -->
					<div
						class="modal fade"
						id="replacedblModal"
						role="dialog"
						aria-labelledby="myModalLabel"
						aria-hidden="true"
						style="background-color: rgba(0, 0, 0, 0.5)"
						data-backdrop="static"
					>
						<div class="modal-dialog" style="width: 530px; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
										&times;
									</button>
									<h4 class="modal-title" id="titleModal">物料替换确认</h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;">
									<div style="text-align: center;">
										<div>
											<span class="modalSpan">物料代码：</span>
											<input
												type="text"
												id="replacedblfNumber"
												class="clean-c form-control bj_color resetting modalInput" 
												readonly="readonly"
											/>
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">物料名称：</span>
											<input
												type="text"
												id="replacedblfName"
												name="fWorkerName"
												class="clean-c form-control bj_color resetting modalInput"
												readonly="readonly"
											/>
										</div>
										<div>
											<span class="modalSpan">规格型号：</span>
											<input
												type="text"
												id="replacedblfModel"
												name="fWorker"
												class="clean-c form-control bj_color resetting modalInput"
												readonly="readonly"
											/>
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">助记码：</span>
											<input
												type="text"
												id="replacedblfHelpCode"
												name="fWorkerName"
												class="clean-c form-control bj_color resetting modalInput"
												readonly="readonly"
											/>
										</div>
										<div>
											<span class="modalSpan">应发数：</span>
											<input
												type="text"
												id="yingdbl"
												name="fWorker"
												class="clean-cs form-control  resetting modalInput"
												autocomplete="off"
											/>
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">应发辅助数：</span>
											<input
												type="text"
												id="yingfudbl"
												name="fWorkerName"
												class="clean-cs form-control resetting modalInput"
												autocomplete="off"
											/>
										</div>
										<div>
											<span class="modalSpan">单位用量：</span>
											<input
												type="text"
												id="yongdbl"
												name="fWorker"
												class="clean-cs form-control  resetting modalInput"
												autocomplete="off"
											/>
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">换算率：</span>
											<input
												type="text"
												id="huandbl"
												name="fWorkerName"
												class="clean-cs form-control resetting modalInput"
												autocomplete="off"
											/>
										</div>
										<div style="margin-top: 10px;">
											<button type="button" class="btn btn-default " id="replacedeblcomfirm">
												确定
											</button>
											<button type="button" class="btn btn-default " id="replacedblResetting">
												重置
											</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>					
					<!-- 替换模态框内，双击某行弹出的模态框 end -->
					<div th:include="Production/showModal :: queryModal" /></div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="base :: bottom" />
	<div th:include="base :: bootstrapTable" />
	<div th:include="base :: plugIn" />
	<div th:include="base :: bootstrapEditable" id="editalbe"/>
	<div th:include="base :: bootstrapTable-eidt" id="eidt"/>
	<script th:src="@{plugins/bootstrapEditable/js/bootstrap-table-editable.js}"></script>
	<div th:include="base :: ztree" />
	<script th:src="@{js/WareHouse/outPicking.js}"></script>
	<script th:src="@{js/Production/pickshowModal.js}"></script>
</body>
</html>
